// web/src/app/api/(forum)/posts/route.ts
import {NextResponse, NextRequest} from "next/server";
import {db} from "@/lib/db";

export async function POST(req: NextRequest) {
    const post = await req.json()
    const res = await db.post.create({
        data: {
            ...post
        }
    })

    return NextResponse.json({post: res})
}